/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ${USER}
 * Date: ${YEAR}-${MONTH}-${DAY}
 * Time: ${TIME}
 */
public class Main {
    public static void main(String[] args) {
        System.out.println("Hello world!");
    }
    public class Solution {
        public ListNode getIntersectionNode(ListNode headA, ListNode headB) {
            ListNode po1 = headA;
            ListNode po2 = headB;
            while (po1 != null) {
                po2 = headB;
                while (po2 != null) {
                    if(po1 == po2) {
                        return po1;
                    }
                    po2 = po2.next;
                }
                po1 = po1.next;
            }
            return null;
        }
    }